﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Manage._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="author" content="Leo Cheung" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <link href="css/ui.css" rel="stylesheet" type="text/css" />
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/fun.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script src="js/menu.js" type="text/javascript"></script>
    <script src="js/layout.js" type="text/javascript"></script>
    <script src="js/accordion.js" type="text/javascript"></script>
    <script src="js/tab.js" type="text/javascript"></script>
    <script type="text/javascript">
        var tab, accordion;
        var tabWidth = 0;
        $(function () {
            $("#main").ligerLayout({ leftWidth: 182, heightDiff: -5, onHeightChanged: heightChanged }); //布局
            $("#menu").ligerAccordion({ height: 'auto' }); //菜单
            $("#cont").ligerTab({
                onAfterSelectTabItem: function () { $("#loading").fadeOut(); }
            });  //选项卡
            accordion = $("#menu").ligerGetAccordionManager();
            tab = $("#cont").ligerGetTabManager();
            $("#menu a").click(function () {
                var url = $(this).attr("rel");
                if (!url) return;
                var tabid = $(this).attr("tabid");
                if (!tabid) {
                    tabid = new Date().getTime();
                    $(this).attr("tabid", tabid)
                }
                addTab(tabid, $(this).html(), url);
            }).hover(function () {
                $(this).addClass("a-hover").siblings().removeClass("a-hover");
            });
            $("#loading").hide(); //.delay(1000).fadeOut(1000);
            $("#loading").css({
                "width": $(".l-layout-center").width(),
                "height": $(".l-layout-center").height() - 30,
                "left": $(".l-layout-center").offset().left,
                "top": $(".l-layout-center").offset().top + 30
            });
            heightChanged($(".l-layout-center"));
        });

        function addTab(tabid, text, url) {
//            if (tabWidth >= $(".l-layout-center").width() - 50) {
//                var currentTabid = $("li.l-selected", tab.tab.links).attr("tabid"); //当前选择的tabid
//                if (currentTabid == "home") return;
//                tab.overrideTabItem(currentTabid, { tabid: tabid, url: url, text: text });
//                tabWidth = $('#cont ul').width();
//                return;
//            }
            tab.addTabItem({ tabid: tabid, text: text, url: url });
            tabWidth = $('#cont ul').width();
        }

        function heightChanged(options) {
            if (tab) tab.addHeight(options.diff);
        }
    </script>
</head>
<body>
    <div id="loading"></div> 
    <div class="top">
	    <div class="left topbg"><img src="images/logo.gif" alt="" /></div>
	    <div class="right topbg">
		    <div class="txt">管理员：<b></b> 您好,感谢登陆使用！</div>
			<div class="out">
                <a href="#" target="_self" onclick="logout();"><img src="images/out.gif" alt="安全退出" /></a>
            </div>
            <div class="clear"></div>
            <div class="tips">dddddd&nbsp;&nbsp;</div>
	    </div>
    </div>
    <div id="paddiv">
        <div id="main">
	        <div position="left" id="menu" title="菜单栏">
				<div title="盈彩印刷" style="vertical-align:top">
				    <a rel="print/base.aspx" href="javascript:void(0);">基本信息</a>
                    <a rel="print/service.aspx" href="javascript:void(0);">印刷项目</a>
                    <a rel="print/show.aspx" href="javascript:void(0);">印品展示</a>
                    <a rel="print/news.aspx" href="javascript:void(0);">印刷常识</a>
                    <a rel="print/used.aspx" href="javascript:void(0);">行业常用</a>
                    <a rel="print/ad.aspx" href="javascript:void(0);">广告图片</a>
                    <a rel="print/link.aspx" href="javascript:void(0);">合作客户</a>
			    </div>
			    <div title="广告制作">
				    <a rel="2.htm" href="javascript:void(0);">列表一</a>
			    </div>
                <div title="设计策划">
				    <a rel="2.htm" href="javascript:void(0);">列表一</a>
			    </div>
                <div title="整合推广">
				    <a rel="2.htm" href="javascript:void(0);">列表一</a>
			    </div>
			    <div title="其他"><a rel="2.htm" href="javascript:void(0);"></a></div>
            </div>
	        <div position="center" id="cont">
                <div tabid="home" title="我的主页" style="height:300px" >
                    <iframe frameborder="0" name="home" id="home" src="main.aspx"></iframe>
                </div> 
            </div>
        </div>
    </div>
</body>
</html>
